<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div class="erweima hide" id="er"></div>
</body>
<script>
  var div = document.getElementById("er");
  //第一种
  // div.className = div.className.replace(" hide","show");
  //第二种
  // var className = div.getAttribute("class");
  // div.setAttribute("class",className.replace(" hide", "show"));
  // 第三种

</script>
</html>